<?php
$this->breadcrumbs=array(
	'Tasks'=>array('index'),
	$model->taskid,
);

$this->menu=array(
	array('label'=>'List Task', 'url'=>array('index')),
	array('label'=>'Create Task', 'url'=>array('create')),
);

//加载展示详细信息时候用的css文件
Yii::app()->clientScript->registerCssFile(Yii::app()->baseUrl . '/css/styles.css');
if($model->status == 2){
	$template = 'Y';
}else{
	$template = 'N';
}
switch($model->periodic){
	case 'O':
		$type = 'Once';
		break;
	case 'S':
		$type = 'Shift';
		break;
	case 'D':
		$type = 'Day';
		break;
	case 'W':
		$type = 'Week';
		break;
	case 'M':
		$type = 'Month';
		break;
	case 'Y':
		$type = 'Year';
		break;
	default :
		$type = 'Once';
}

if($model->estart)$model->estart = date("Y-m-d",$model->estart);
if($model->rstart)$model->rstart = date("Y-m-d",$model->rstart);
if($model->eend)$model->eend = date("Y-m-d",$model->eend);
if($model->rend)$model->rend = date("Y-m-d",$model->rend);
$model->create_time = date("Y-m-d H:i:s",$model->create_time);
$model->update_time = date("Y-m-d H:i:s",$model->update_time);
?>
<h1>View Task #<?php echo $model->taskid; ?></h1>
<table id="yw1" class="detail-view">
    <tbody>
        <tr class="odd">
            <th style="width:15%; text-align:left;">Tcode</th>
            <td style="width:35%;"><?=$model->tcode?></td>
            <th style="width:15%; text-align:left;">Tcode Path</th>
            <td>NONE</td>
        </tr>
        <tr class="even">
            <th style="width:15%; text-align:left;">Sub Code</th>
            <td style="width:35%;"><?=$model->subcode?></td>
            <th style="width:15%; text-align:left;">Sub Code Path</th>
            <td>NONE</td>
        </tr>
        <tr class="odd">
            <th style="width:15%; text-align:left;">Group</th>
            <td style="width:35%;"><?=$model->group?></td>
            <th style="width:15%; text-align:left;">Periodic</th>
            <td><?=$type?></td>
        </tr>
        <tr class="even">
            <th style="width:15%; text-align:left;">TCO</th>
            <td style="width:35%;"><?=$model->tco?></td>
            <th style="width:15%; text-align:left;">SCO</th>
            <td><?=$model->sco?></td>
        </tr>
        <tr class="odd">
            <th style="width:15%; text-align:left;">Urgency</th>
            <td style="width:35%;"><?=$model->urgency?></td>
            <th style="width:15%; text-align:left;">Total Complete %</th>
            <td><?=$model->complete?></td>
        </tr>
        <tr class="even">
            <th style="width:15%; text-align:left;">Start Date</th>
            <td style="width:35%;"><?=$model->estart?></td>
            <th style="width:15%; text-align:left;">End Date</th>
            <td><?=$model->eend?></td>
        </tr>
        <tr class="odd">
            <th style="width:15%; text-align:left;">Real Start Date</th>
            <td style="width:35%;"><?=$model->rstart?></td>
            <th style="width:15%; text-align:left;">Real End Date</th>
            <td><?=$model->rend?></td>
        </tr>
        <tr class="even">
            <th style="width:15%; text-align:left;">Task</th>
            <td style="width:35%;"><?=$model->task?></td>
            <th style="width:15%; text-align:left;">Status</th>
            <td><?=$model->status?></td>
        </tr>
        <tr class="odd">
            <th style="width:15%; text-align:left;">Task Detail</th>
            <td colspan="3"><?=$model->taskdetail?></td>
        </tr>
        <tr class="even">
            <th style="width:15%; text-align:left;">FU Date</th>
            <td style="width:35%;"><?=$model->follow_up_date?></td>
            <th style="width:15%; text-align:left;">FU Person</th>
            <td><?=$model->follow_up_person?></td>
        </tr>
        <tr class="odd">
            <th style="width:15%; text-align:left;">Remark</th>
            <td colspan="3"><?=$model->remark?></td>
        </tr>
        <tr class="even">
            <th style="width:15%; text-align:left;">Created By</th>
            <td style="width:35%;"><?=$model->created_by?></td>
            <th style="width:15%; text-align:left;">Updated By</th>
            <td><?=$model->updated_by?></td>
        </tr>
        <tr class="odd">
            <th style="width:15%; text-align:left;">Created</th>
            <td style="width:35%;"><?=$model->create_time?></td>
            <th style="width:15%; text-align:left;">Updated</th>
            <td><?=$model->update_time?></td>
        </tr>
    </tbody>
</table>